package tech.wangpai.initializer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import tech.wangpai.initializer.init.SecondInitializer;

@SpringBootApplication
public class InitializerApplication {
    public static void main(String[] args) {
//        SpringApplication.run(InitializerApplication.class,args);

        //第二种系统初始化器方式，替代spring.facories方式
        SpringApplication springApplication = new SpringApplication(InitializerApplication.class);
        springApplication.addInitializers(new SecondInitializer());
        springApplication.run(args);
    }
}
